import { expect } from 'chai';
import { masking } from '../src/util';



describe('masking function', () => {

    it('should mask the password in http url', () => {
    const input = Error('http://username:password@example.com');
    const expectedOutput = 'http://username@example.com';
    expect(masking(input.message)).to.equal(expectedOutput);
  });

  it('should mask the password in https url', () => {
    const input = 'https://username:password@example.com';
    const expectedOutput = 'https://username@example.com';
    expect(masking(input)).to.equal(expectedOutput);
  });

});
